package com.jsbj.user.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 角色信息表
 * </p>
 *
 * @author jsbj
 * @since 2022-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysRole对象", description="角色信息表")
public class SysRole implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "表ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "角色权限字符串")
    private String roleCode;

    @ApiModelProperty(value = "角色类型 1普通角色；2安全科角色（可看到敏感数据，比如身份证手机号等）")
    private String roleType;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "是否可用  0可用 1不可用")
    private Integer disabled;

    @ApiModelProperty(value = "创建人用户ID")
    private String createrId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @ApiModelProperty(value = "最后变更人用户ID")
    private String updateId;

    @ApiModelProperty(value = "最后变更时间")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    private List<SysRoleEqu> sysRoleEqus;

    @TableField(exist = false)
    private List<SysRoleOrg> sysRoleOrgs;

    @TableField(exist = false)
    private List<SysRolePermission> sysRolePermissions;

    @TableField(exist = false)
    private List<SysRoleUser> sysRoleUsers;

    @TableField(exist = false)
    private List<SysRoleTenant> sysRoleTenants;
}
